<?php
cs()->registerCssFile(bu() . '/plugins/fancybox/jquery.fancybox-1.3.1.css');
cs()->registerScriptFile(bu() . '/plugins/fancybox/jquery.mousewheel-3.0.2.pack.js', CClientScript::POS_BEGIN);
cs()->registerScriptFile(bu() . '/plugins/fancybox/jquery.fancybox-1.3.1.pack.js', CClientScript::POS_BEGIN);
$is_indo=lang()=="id";
/* @var $this SiteController */
$this->pageTitle = Yii::app()->name;
$You = new YouTube();

//define("client","pragina gong"); 
$this->menu = '';
$this->nav = '	<!--Thumbnail Navigation-->
	<div id="prevthumb"></div>
	<div id="nextthumb"></div>
	
	<!--Arrow Navigation-->
	<a id="prevslide" class="load-item"></a>
	<a id="nextslide" class="load-item"></a>
	
	<!--<div id="thumb-tray" class="load-item">
		<div id="thumb-back"></div>
		<div id="thumb-forward"></div>
	</div>-->
	
	<!--Time Bar-->
<!--	<div id="progress-back" class="load-item">
		<div id="progress-bar"></div>-->
	</div>';
$this->slideshow = 1;
$this->autoplay = 1;
$this->start_slide = 1;
$this->height = 'height: 798px;';
$title = '';
/*about us*/
$titleabout= $is_indo ? $model_about[0]->judul : $model_about[0]->title; 
$titleabout=ucwords(CmsU::break_words($titleabout,50,''));
$isiabout= $is_indo ? $model_about[0]->isi_halaman : $model_about[0]->content;
$isiabout =trim(CmsU::break_words($isiabout,100,''));
$bersihkan=strip_tags(trim($isiabout));
$isiabout= str_replace("&nbsp;","",$bersihkan);
$link= $is_indo ? $model_about[0]->slug_id : $model_about[0]->slug_en;
$link=url('page/view',array('id'=>''.$link.'')); 
    
/*news*/
$titlenews= $is_indo ? $model_news[0]->nama : $model_news[0]->name_; 
$titlenews=CmsU::break_words($titlenews,50,'');
$isinews= $is_indo ? $model_news[0]->keterangan : $model_news[0]->content; 
$isinews =trim(CmsU::break_words($isinews,120,''));
$isinews=strip_tags(trim($isinews));
$isiabout= str_replace("&nbsp;","",$bersihkan);
$linknews= $is_indo ? $model_linknews[0]->slug_id : $model_linknews[0]->slug_en;
$linknews=url("agenda/view",array('id'=>$model_news[0]['id']));

 


/*video*/
$titlevideo=  $model_video[0]->nama_; 
$filev=  $model_video[0]->v; 
$linkvideo= $is_indo ? $model_linkvideo[0]->slug_id : $model_linkvideo[0]->slug_en;
$linkvideo=url('galeri/video');  
?>
<script>
    $(document).ready(function () {
        $(".my_video").click(function () {
            $.fancybox({
                'padding':0,
                'autoScale':false,
                'transitionIn':'none',
                'transitionOut':'none',
                'title':this.title,
                'href':this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                'type':'swf',
                'swf':{
                    'wmode':'transparent',
                    'allowfullscreen':'true'
                }
            });
            return false;
        });
        
   
    });
</script>
<div style="position:relative">
    <div style="position:absolute;top:600px; width:923px;background:url(img/bck_index3.png) repeat-x top center;height:210px; ">
        <div style="float:left;width:242px;height:200px;padding:10px 80px 10px 15px">
            <div class="judul" style="border-bottom: 2px dotted whitesmoke;height:30px">About Us</div>
            <div style="border-bottom: 2px dotted whitesmoke;height:110px">
                <div class="subjudul1" style="padding-top:30px;"><?=$titleabout?></div>
                <div class="isi" ><?=$isiabout?>...
                </div>
            </div>
            <div style="height:20px;padding:5px 0px"><a href="<?=$link?>"><img src="img/read_more.png" border="0"/></a></div>
        </div>
        <div style="float:left;width:242px;height:200px;padding:10px 60px 10px 15px">
            <div class="judul" style="border-bottom: 2px dotted whitesmoke;height:30px">News</div>
            <div style="border-bottom: 2px dotted whitesmoke;height:110px">
                <table cellpadding="0" cellspacing="0" border="0" style="height:100px;padding-top:10px">
                    <tr>
                        <td class="subjudul3" valign="top"
                            style="height:30px;padding-top:20px;border-right: 2px dotted whitesmoke;">
                            <?=sql2date($model_news[0]['tgl_mulai'],'dd')?><br/>
                           <?=strtoupper(sql2date($model_news[0]['tgl_mulai'],'MMM'))?>
                        </td>
                        <td valign="top" style="height:30px;padding-top:20px;padding-left: 5px;">
                            <div class="subjudul2"><?=$titlenews?></div>
                            <div class="isi"><?=$isinews?>...
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div style="height:20px;padding:5px 0px"><a href="<?=$linknews?>"><img src="img/read_more.png" border="0"/></a></div>
        </div>
        <div style="float:left;width:242px;height:200px;padding:10px 5px 10px 15px">
            <div class="judul" style="border-bottom: 2px dotted whitesmoke;height:30px">Video</div>
            <div style="height:130px;padding:5px 0px" align="center">
                <a class="my_video " href="http://www.youtube.com/watch?v=<?=$filev?>" title="<?=$titlevideo?>">
            		<div><img border="0" src="http://img.youtube.com/vi/<?=$filev?>/2.jpg" width="197px" height="138px"  /></div></a>
                   
            </div>
        </div>
    </div>
</div>
</div>
